#!/bin/bash
rm -rf CMakeCache.txt > /dev/null 2>&1
rm -rf cmake_install.cmake > /dev/null 2>&1
rm -rf Makefile > /dev/null 2>&1
rm -rf CMakeFiles > /dev/null 2>&1
rm -rf build > /dev/null 2>&1
rm -rf message.pb.* > /dev/null 2>&1
protoc -I=. --cpp_out=. message.proto

mkdir -p build
cmake -B ./build
cd build
make -j3
./test
cd ..